#pragma once

namespace optimizer {

class Operator;

class LeafOperator;
class PhysicalSeqScan;
class OrderBy;
class Limit;
class LogicalGet;
class LogicalLimit;
class LogicalSetOperation;
class LogicalJoin;
class LogicalAggregate;

/**
 * Utility class for visitor pattern
 */
class OperatorVisitor {
 public:
  virtual ~OperatorVisitor() = default;

  virtual void Visit(Operator *leaf);

  virtual void Visit(LeafOperator *leaf);
  virtual void Visit(LogicalGet *logical_get);
  virtual void Visit(LogicalLimit *logical_limit);
  virtual void Visit(LogicalSetOperation *logical_limit);
  virtual void Visit(LogicalJoin *logical_limit);
  virtual void Visit(LogicalAggregate *logical_limit);

  virtual void Visit(PhysicalSeqScan *seq_scan);
  virtual void Visit(OrderBy *order_by);
  virtual void Visit(Limit *limit);
};

}  // namespace optimizer
